function y=neighbor_predict_study(x,opt)

% neighbor_predict_study collection of studies of commitee composition
%Syntax: y=neighbor_predict_study(x,opt)
%   x is typically {dy,dt}, the model and validation structures
%   opt is a toggle for the different studies

if nargin<2
    opt='subOptSize';
end


switch opt
    case 'subOptSize' % screening other commitees sizes to see how well they would have done for the validaton dataset
        dy=x{1};dt=x{2};
        TT=[dy.predict.T];
        m=30; %<-- max com. size investigated
        for i=1:length(dy.predict)
            dT=dy;
            dT.predict=dT.predict(i);
            dT.y=dT.y<dT.predict.T;
            OptAUC(i)=roc(dt.y<dT.predict.T,neighbor_predict(dT,dt.nx));
            [lala,y.OptN(i)]=neighbor_predict(dT,dt.nx);
            for j=1:m
                disp([i,j]);
                AUCij(i,j)=roc(dt.y<dT.predict.T,neighbor_predict(dT,dt.nx,j));
            end
        end
        y.AUCij=AUCij;
        y.OptAUC=OptAUC;
        y.T=TT;
end